Optimal. Leaf size=304 \[ \frac {\sqrt {\frac {\pi }{6}} \sqrt {d} \sin \left (3 a-\frac {3 b c}{d}\right ) C\left (\frac {\sqrt {b} \sqrt {\frac {6}{\pi }} \sqrt {c+d x}}{\sqrt {d}}\right )}{12 b^{3/2}}-\frac {\sqrt {\frac {\pi }{2}} \sqrt {d} \sin \left (a-\frac {b c}{d}\right ) C\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }} \sqrt {c+d x}}{\sqrt {d}}\right )}{4 b^{3/2}}-\frac {\sqrt {\frac {\pi }{2}} \sqrt {d} \cos \left (a-\frac {b c}{d}\right ) S\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }} \sqrt {c+d x}}{\sqrt {d}}\right )}{4 b^{3/2}}+\frac {\sqrt {\frac {\pi }{6}} \sqrt {d} \cos \left (3 a-\frac {3 b c}{d}\right ) S\left (\frac {\sqrt {b} \sqrt {\frac {6}{\pi }} \sqrt {c+d x}}{\sqrt {d}}\right )}{12 b^{3/2}}+\frac {\sqrt {c+d x} \sin (a+b x)}{4 b}-\frac {\sqrt {c+d x} \sin (3 a+3 b x)}{12 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.47, antiderivative size = 304, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 7, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.292, Rules used = {4406, 3296, 3306, 3305, 3351, 3304, 3352} \[ \frac {\sqrt {\frac {\pi }{6}} \sqrt {d} \sin \left (3 a-\frac {3 b c}{d}\right ) \text {FresnelC}\left (\frac {\sqrt {\frac {6}{\pi }} \sqrt {b} \sqrt {c+d x}}{\sqrt {d}}\right )}{12 b^{3/2}}-\frac {\sqrt {\frac {\pi }{2}} \sqrt {d} \sin \left (a-\frac {b c}{d}\right ) \text {FresnelC}\left (\frac {\sqrt {\frac {2}{\pi }} \sqrt {b} \sqrt {c+d x}}{\sqrt {d}}\right )}{4 b^{3/2}}-\frac {\sqrt {\frac {\pi }{2}} \sqrt {d} \cos \left (a-\frac {b c}{d}\right ) S\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }} \sqrt {c+d x}}{\sqrt {d}}\right )}{4 b^{3/2}}+\frac {\sqrt {\frac {\pi }{6}} \sqrt {d} \cos \left (3 a-\frac {3 b c}{d}\right ) S\left (\frac {\sqrt {b} \sqrt {\frac {6}{\pi }} \sqrt {c+d x}}{\sqrt {d}}\right )}{12 b^{3/2}}+\frac {\sqrt {c+d x} \sin (a+b x)}{4 b}-\frac {\sqrt {c+d x} \sin (3 a+3 b x)}{12 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3296
Rule 3304
Rule 3305
Rule 3306
Rule 3351
Rule 3352
Rule 4406
Rubi steps
\begin {align*} \int \sqrt {c+d x} \cos (a+b x) \sin ^2(a+b x) \, dx &=\int \left (\frac {1}{4} \sqrt {c+d x} \cos (a+b x)-\frac {1}{4} \sqrt {c+d x} \cos (3 a+3 b x)\right ) \, dx\\ &=\frac {1}{4} \int \sqrt {c+d x} \cos (a+b x) \, dx-\frac {1}{4} \int \sqrt {c+d x} \cos (3 a+3 b x) \, dx\\ &=\frac {\sqrt {c+d x} \sin (a+b x)}{4 b}-\frac {\sqrt {c+d x} \sin (3 a+3 b x)}{12 b}+\frac {d \int \frac {\sin (3 a+3 b x)}{\sqrt {c+d x}} \, dx}{24 b}-\frac {d \int \frac {\sin (a+b x)}{\sqrt {c+d x}} \, dx}{8 b}\\ &=\frac {\sqrt {c+d x} \sin (a+b x)}{4 b}-\frac {\sqrt {c+d x} \sin (3 a+3 b x)}{12 b}+\frac {\left (d \cos \left (3 a-\frac {3 b c}{d}\right )\right ) \int \frac {\sin \left (\frac {3 b c}{d}+3 b x\right )}{\sqrt {c+d x}} \, dx}{24 b}-\frac {\left (d \cos \left (a-\frac {b c}{d}\right )\right ) \int \frac {\sin \left (\frac {b c}{d}+b x\right )}{\sqrt {c+d x}} \, dx}{8 b}+\frac {\left (d \sin \left (3 a-\frac {3 b c}{d}\right )\right ) \int \frac {\cos \left (\frac {3 b c}{d}+3 b x\right )}{\sqrt {c+d x}} \, dx}{24 b}-\frac {\left (d \sin \left (a-\frac {b c}{d}\right )\right ) \int \frac {\cos \left (\frac {b c}{d}+b x\right )}{\sqrt {c+d x}} \, dx}{8 b}\\ &=\frac {\sqrt {c+d x} \sin (a+b x)}{4 b}-\frac {\sqrt {c+d x} \sin (3 a+3 b x)}{12 b}+\frac {\cos \left (3 a-\frac {3 b c}{d}\right ) \operatorname {Subst}\left (\int \sin \left (\frac {3 b x^2}{d}\right ) \, dx,x,\sqrt {c+d x}\right )}{12 b}-\frac {\cos \left (a-\frac {b c}{d}\right ) \operatorname {Subst}\left (\int \sin \left (\frac {b x^2}{d}\right ) \, dx,x,\sqrt {c+d x}\right )}{4 b}+\frac {\sin \left (3 a-\frac {3 b c}{d}\right ) \operatorname {Subst}\left (\int \cos \left (\frac {3 b x^2}{d}\right ) \, dx,x,\sqrt {c+d x}\right )}{12 b}-\frac {\sin \left (a-\frac {b c}{d}\right ) \operatorname {Subst}\left (\int \cos \left (\frac {b x^2}{d}\right ) \, dx,x,\sqrt {c+d x}\right )}{4 b}\\ &=-\frac {\sqrt {d} \sqrt {\frac {\pi }{2}} \cos \left (a-\frac {b c}{d}\right ) S\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }} \sqrt {c+d x}}{\sqrt {d}}\right )}{4 b^{3/2}}+\frac {\sqrt {d} \sqrt {\frac {\pi }{6}} \cos \left (3 a-\frac {3 b c}{d}\right ) S\left (\frac {\sqrt {b} \sqrt {\frac {6}{\pi }} \sqrt {c+d x}}{\sqrt {d}}\right )}{12 b^{3/2}}+\frac {\sqrt {d} \sqrt {\frac {\pi }{6}} C\left (\frac {\sqrt {b} \sqrt {\frac {6}{\pi }} \sqrt {c+d x}}{\sqrt {d}}\right ) \sin \left (3 a-\frac {3 b c}{d}\right )}{12 b^{3/2}}-\frac {\sqrt {d} \sqrt {\frac {\pi }{2}} C\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }} \sqrt {c+d x}}{\sqrt {d}}\right ) \sin \left (a-\frac {b c}{d}\right )}{4 b^{3/2}}+\frac {\sqrt {c+d x} \sin (a+b x)}{4 b}-\frac {\sqrt {c+d x} \sin (3 a+3 b x)}{12 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 5.36, size = 264, normalized size = 0.87 \[ \frac {\frac {\sqrt {6 \pi } \sin \left (3 a-\frac {3 b c}{d}\right ) C\left (\sqrt {\frac {b}{d}} \sqrt {\frac {6}{\pi }} \sqrt {c+d x}\right )+\sqrt {6 \pi } \cos \left (3 a-\frac {3 b c}{d}\right ) S\left (\sqrt {\frac {b}{d}} \sqrt {\frac {6}{\pi }} \sqrt {c+d x}\right )-6 \sqrt {\frac {b}{d}} \sqrt {c+d x} \sin (3 (a+b x))}{\sqrt {\frac {b}{d}}}-9 i \sqrt {c+d x} e^{-\frac {i (a d+b c)}{d}} \left (\frac {e^{2 i a} \Gamma \left (\frac {3}{2},-\frac {i b (c+d x)}{d}\right )}{\sqrt {-\frac {i b (c+d x)}{d}}}-\frac {e^{\frac {2 i b c}{d}} \Gamma \left (\frac {3}{2},\frac {i b (c+d x)}{d}\right )}{\sqrt {\frac {i b (c+d x)}{d}}}\right )}{72 b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.56, size = 245, normalized size = 0.81 \[ \frac {\sqrt {6} \pi d \sqrt {\frac {b}{\pi d}} \cos \left (-\frac {3 \, {\left (b c - a d\right )}}{d}\right ) \operatorname {S}\left (\sqrt {6} \sqrt {d x + c} \sqrt {\frac {b}{\pi d}}\right ) - 9 \, \sqrt {2} \pi d \sqrt {\frac {b}{\pi d}} \cos \left (-\frac {b c - a d}{d}\right ) \operatorname {S}\left (\sqrt {2} \sqrt {d x + c} \sqrt {\frac {b}{\pi d}}\right ) - 9 \, \sqrt {2} \pi d \sqrt {\frac {b}{\pi d}} \operatorname {C}\left (\sqrt {2} \sqrt {d x + c} \sqrt {\frac {b}{\pi d}}\right ) \sin \left (-\frac {b c - a d}{d}\right ) + \sqrt {6} \pi d \sqrt {\frac {b}{\pi d}} \operatorname {C}\left (\sqrt {6} \sqrt {d x + c} \sqrt {\frac {b}{\pi d}}\right ) \sin \left (-\frac {3 \, {\left (b c - a d\right )}}{d}\right ) - 24 \, {\left (b \cos \left (b x + a\right )^{2} - b\right )} \sqrt {d x + c} \sin \left (b x + a\right )}{72 \, b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [C] time = 2.85, size = 838, normalized size = 2.76 \[ -\frac {\frac {\sqrt {6} \sqrt {\pi } {\left (6 \, b c + i \, d\right )} d \operatorname {erf}\left (-\frac {\sqrt {6} \sqrt {b d} \sqrt {d x + c} {\left (\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}}{2 \, d}\right ) e^{\left (\frac {3 i \, b c - 3 i \, a d}{d}\right )}}{\sqrt {b d} {\left (\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )} b} - \frac {9 \, \sqrt {2} \sqrt {\pi } {\left (2 \, b c + i \, d\right )} d \operatorname {erf}\left (-\frac {\sqrt {2} \sqrt {b d} \sqrt {d x + c} {\left (\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}}{2 \, d}\right ) e^{\left (\frac {i \, b c - i \, a d}{d}\right )}}{\sqrt {b d} {\left (\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )} b} - \frac {9 \, \sqrt {2} \sqrt {\pi } {\left (2 \, b c - i \, d\right )} d \operatorname {erf}\left (-\frac {\sqrt {2} \sqrt {b d} \sqrt {d x + c} {\left (-\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}}{2 \, d}\right ) e^{\left (\frac {-i \, b c + i \, a d}{d}\right )}}{\sqrt {b d} {\left (-\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )} b} + \frac {\sqrt {6} \sqrt {\pi } {\left (6 \, b c - i \, d\right )} d \operatorname {erf}\left (-\frac {\sqrt {6} \sqrt {b d} \sqrt {d x + c} {\left (-\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}}{2 \, d}\right ) e^{\left (\frac {-3 i \, b c + 3 i \, a d}{d}\right )}}{\sqrt {b d} {\left (-\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )} b} - 6 \, {\left (\frac {\sqrt {6} \sqrt {\pi } d \operatorname {erf}\left (-\frac {\sqrt {6} \sqrt {b d} \sqrt {d x + c} {\left (\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}}{2 \, d}\right ) e^{\left (\frac {3 i \, b c - 3 i \, a d}{d}\right )}}{\sqrt {b d} {\left (\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}} - \frac {3 \, \sqrt {2} \sqrt {\pi } d \operatorname {erf}\left (-\frac {\sqrt {2} \sqrt {b d} \sqrt {d x + c} {\left (\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}}{2 \, d}\right ) e^{\left (\frac {i \, b c - i \, a d}{d}\right )}}{\sqrt {b d} {\left (\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}} - \frac {3 \, \sqrt {2} \sqrt {\pi } d \operatorname {erf}\left (-\frac {\sqrt {2} \sqrt {b d} \sqrt {d x + c} {\left (-\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}}{2 \, d}\right ) e^{\left (\frac {-i \, b c + i \, a d}{d}\right )}}{\sqrt {b d} {\left (-\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}} + \frac {\sqrt {6} \sqrt {\pi } d \operatorname {erf}\left (-\frac {\sqrt {6} \sqrt {b d} \sqrt {d x + c} {\left (-\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}}{2 \, d}\right ) e^{\left (\frac {-3 i \, b c + 3 i \, a d}{d}\right )}}{\sqrt {b d} {\left (-\frac {i \, b d}{\sqrt {b^{2} d^{2}}} + 1\right )}}\right )} c - \frac {6 i \, \sqrt {d x + c} d e^{\left (\frac {3 i \, {\left (d x + c\right )} b - 3 i \, b c + 3 i \, a d}{d}\right )}}{b} + \frac {18 i \, \sqrt {d x + c} d e^{\left (\frac {i \, {\left (d x + c\right )} b - i \, b c + i \, a d}{d}\right )}}{b} - \frac {18 i \, \sqrt {d x + c} d e^{\left (\frac {-i \, {\left (d x + c\right )} b + i \, b c - i \, a d}{d}\right )}}{b} + \frac {6 i \, \sqrt {d x + c} d e^{\left (\frac {-3 i \, {\left (d x + c\right )} b + 3 i \, b c - 3 i \, a d}{d}\right )}}{b}}{144 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 294, normalized size = 0.97 \[ \frac {\frac {d \sqrt {d x +c}\, \sin \left (\frac {\left (d x +c \right ) b}{d}+\frac {d a -c b}{d}\right )}{4 b}-\frac {d \sqrt {2}\, \sqrt {\pi }\, \left (\cos \left (\frac {d a -c b}{d}\right ) \mathrm {S}\left (\frac {\sqrt {2}\, \sqrt {d x +c}\, b}{\sqrt {\pi }\, \sqrt {\frac {b}{d}}\, d}\right )+\sin \left (\frac {d a -c b}{d}\right ) \FresnelC \left (\frac {\sqrt {2}\, \sqrt {d x +c}\, b}{\sqrt {\pi }\, \sqrt {\frac {b}{d}}\, d}\right )\right )}{8 b \sqrt {\frac {b}{d}}}-\frac {d \sqrt {d x +c}\, \sin \left (\frac {3 \left (d x +c \right ) b}{d}+\frac {3 d a -3 c b}{d}\right )}{12 b}+\frac {d \sqrt {2}\, \sqrt {\pi }\, \sqrt {3}\, \left (\cos \left (\frac {3 d a -3 c b}{d}\right ) \mathrm {S}\left (\frac {\sqrt {2}\, \sqrt {3}\, \sqrt {d x +c}\, b}{\sqrt {\pi }\, \sqrt {\frac {b}{d}}\, d}\right )+\sin \left (\frac {3 d a -3 c b}{d}\right ) \FresnelC \left (\frac {\sqrt {2}\, \sqrt {3}\, \sqrt {d x +c}\, b}{\sqrt {\pi }\, \sqrt {\frac {b}{d}}\, d}\right )\right )}{72 b \sqrt {\frac {b}{d}}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 0.57, size = 422, normalized size = 1.39 \[ -\frac {{\left (\frac {24 \, \sqrt {d x + c} b^{2} \sin \left (\frac {3 \, {\left ({\left (d x + c\right )} b - b c + a d\right )}}{d}\right )}{d} - \frac {72 \, \sqrt {d x + c} b^{2} \sin \left (\frac {{\left (d x + c\right )} b - b c + a d}{d}\right )}{d} + {\left (-\left (i + 1\right ) \cdot 9^{\frac {1}{4}} \sqrt {2} \sqrt {\pi } b \left (\frac {b^{2}}{d^{2}}\right )^{\frac {1}{4}} \cos \left (-\frac {3 \, {\left (b c - a d\right )}}{d}\right ) + \left (i - 1\right ) \cdot 9^{\frac {1}{4}} \sqrt {2} \sqrt {\pi } b \left (\frac {b^{2}}{d^{2}}\right )^{\frac {1}{4}} \sin \left (-\frac {3 \, {\left (b c - a d\right )}}{d}\right )\right )} \operatorname {erf}\left (\sqrt {d x + c} \sqrt {\frac {3 i \, b}{d}}\right ) + {\left (\left (9 i + 9\right ) \, \sqrt {2} \sqrt {\pi } b \left (\frac {b^{2}}{d^{2}}\right )^{\frac {1}{4}} \cos \left (-\frac {b c - a d}{d}\right ) - \left (9 i - 9\right ) \, \sqrt {2} \sqrt {\pi } b \left (\frac {b^{2}}{d^{2}}\right )^{\frac {1}{4}} \sin \left (-\frac {b c - a d}{d}\right )\right )} \operatorname {erf}\left (\sqrt {d x + c} \sqrt {\frac {i \, b}{d}}\right ) + {\left (-\left (9 i - 9\right ) \, \sqrt {2} \sqrt {\pi } b \left (\frac {b^{2}}{d^{2}}\right )^{\frac {1}{4}} \cos \left (-\frac {b c - a d}{d}\right ) + \left (9 i + 9\right ) \, \sqrt {2} \sqrt {\pi } b \left (\frac {b^{2}}{d^{2}}\right )^{\frac {1}{4}} \sin \left (-\frac {b c - a d}{d}\right )\right )} \operatorname {erf}\left (\sqrt {d x + c} \sqrt {-\frac {i \, b}{d}}\right ) + {\left (\left (i - 1\right ) \cdot 9^{\frac {1}{4}} \sqrt {2} \sqrt {\pi } b \left (\frac {b^{2}}{d^{2}}\right )^{\frac {1}{4}} \cos \left (-\frac {3 \, {\left (b c - a d\right )}}{d}\right ) - \left (i + 1\right ) \cdot 9^{\frac {1}{4}} \sqrt {2} \sqrt {\pi } b \left (\frac {b^{2}}{d^{2}}\right )^{\frac {1}{4}} \sin \left (-\frac {3 \, {\left (b c - a d\right )}}{d}\right )\right )} \operatorname {erf}\left (\sqrt {d x + c} \sqrt {-\frac {3 i \, b}{d}}\right )\right )} d}{288 \, b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \cos \left (a+b\,x\right )\,{\sin \left (a+b\,x\right )}^2\,\sqrt {c+d\,x} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {c + d x} \sin ^{2}{\left (a + b x \right )} \cos {\left (a + b x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________